  <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xHTML1/DTD/xHTML1-transitional.dtd">
<HTML XMLns="http://www.w3.org/1999/xHTML" lang="gb2312">
<head>
<title>24png</title>
<meta name="keywords" content="JS,事件冒泡,cancelBubble,stopPropagation" charset=utf-8/>
<!--[if !IE]> -->
  <script src="http://cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script>
  <!-- <![endif]-->
  <!--[if IE]>
      <script src="http://cdn.bootcss.com/jquery/1.12.0/jquery.js"></script>
  <![endif]-->
<style>
*{
  margin:0;
  padding:0;
}
  body{
    webkit-text-size-adjust: none;

  }
</style>



</head>
<body>
  <div><p style="font-size:10px">yingwen<p></div>
<div><img src="../rsc/tongzhi.png" id="test" class="normal"  myclass="my"></div>
<div><img src="../rsc/tongzhi2.png"></div>
<script>
$(document).ready(function() {
  var a=document.getElementById("test").attributes["class"].value; 
  var b=document.getElementById("test").attributes["myclass"].value;
  var c=document.getElementById("test").getAttribute("class");
  var d=document.getElementById("test").getAttribute("myclass"); 
  alert(a) ;
  alert(b) ;
  alert(c) ;
  alert(d) ;
});

</script>
</body>
</HTML>